<template>
	<view>
		<view class="movie">
			<image class="img" :src="movieDetail.movies.cover" mode=""></image>
			<view class="detail">
				<view>{{movieDetail.title}}</view>
				<view>导演：{{movieDetail.directors}}</view>
				<view>演员：{{movieDetail.actors.join(' ')}}</view>
				<view>地区：{{movieDetail.region}}</view>
				<view>年份：{{movieDetail.release_year}}</view>
				<view>类型：{{movieDetail.subtype}}</view>
				<view>评分：{{movieDetail.rate}}</view>
				<view>时长：{{movieDetail.duration}}</view>
				<view>短评</view>
				<view>{{movieDetail.short_comment.author}}：{{movieDetail.short_comment.content}}</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				movieDetail:{}
			}
		},
		onLoad(option) {
			this.getMovieDetail({id:option.id})
		},
		methods: {
			async getMovieDetail(id){
				const data = await this.$api.movies.getMovieDetail(id);
				console.log(data);
				if(data.code){
					this.movieDetail = data.result;
				}
			}
		}
	}
</script>

<style scoped lang='scss'>
.movie{
	width: 750rpx;
	height: 550rpx;
	/* text-align: center; */
}
.img{
	width: 100%;
	height: 100%;
	/* margin: 10rpx auto; */
}
.detail{
	padding: 10rpx 25rpx;
	view{
		margin: 10rpx 0;
	}
}
</style>
